<!DOCTYPE html>


<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Phaser CE Class: Loader</title>
	<link rel="stylesheet" href="styles/site.phaser.css?2018062611">
</head>

<body>


<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
  <div class="container-fluid">
  	<div class="navbar-header">
  		<a class="navbar-brand" href="index.html">Phaser CE</a>
  		<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
  			<span class="icon-bar"></span>
  			<span class="icon-bar"></span>
  			<span class="icon-bar"></span>
      </button>
  	</div>
  	<div class="navbar-collapse collapse" id="topNavigation">
  		<ul class="nav navbar-nav">
  			
  			<li class="dropdown">
  				<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
  				<ul class="dropdown-menu ">
  					<li><a href="Phaser.html">Phaser</a></li><li><a href="PhaserGlobal.html">PhaserGlobal</a></li><li><a href="PIXI.html">PIXI</a></li>
  				</ul>
  			</li>
  			
  			<li class="dropdown">
  				<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
  				<ul class="dropdown-menu ">
  					<li><a href="CreatureShader.html">CreatureShader</a></li><li><a href="EarCut.html">EarCut</a></li><li><a href="Event.html">Event</a></li><li><a href="EventTarget.html">EventTarget</a></li><li><a href="Phaser.Animation.html">Phaser.Animation</a></li><li><a href="Phaser.AnimationManager.html">Phaser.AnimationManager</a></li><li><a href="Phaser.AnimationParser.html">Phaser.AnimationParser</a></li><li><a href="Phaser.ArraySet.html">Phaser.ArraySet</a></li><li><a href="Phaser.ArrayUtils.html">Phaser.ArrayUtils</a></li><li><a href="Phaser.AudioSprite.html">Phaser.AudioSprite</a></li><li><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></li><li><a href="Phaser.BitmapText.html">Phaser.BitmapText</a></li><li><a href="Phaser.Bullet.html">Phaser.Bullet</a></li><li><a href="Phaser.Button.html">Phaser.Button</a></li><li><a href="Phaser.Cache.html">Phaser.Cache</a></li><li><a href="Phaser.Camera.html">Phaser.Camera</a></li><li><a href="Phaser.Canvas.html">Phaser.Canvas</a></li><li><a href="Phaser.CanvasPool.html">Phaser.CanvasPool</a></li><li><a href="Phaser.Circle.html">Phaser.Circle</a></li><li><a href="Phaser.Color.html">Phaser.Color</a></li><li><a href="Phaser.Component.Angle.html">Phaser.Component.Angle</a></li><li><a href="Phaser.Component.Animation.html">Phaser.Component.Animation</a></li><li><a href="Phaser.Component.AutoCull.html">Phaser.Component.AutoCull</a></li><li><a href="Phaser.Component.Bounds.html">Phaser.Component.Bounds</a></li><li><a href="Phaser.Component.BringToTop.html">Phaser.Component.BringToTop</a></li><li><a href="Phaser.Component.Core.html">Phaser.Component.Core</a></li><li><a href="Phaser.Component.Crop.html">Phaser.Component.Crop</a></li><li><a href="Phaser.Component.Delta.html">Phaser.Component.Delta</a></li><li><a href="Phaser.Component.Destroy.html">Phaser.Component.Destroy</a></li><li><a href="Phaser.Component.FixedToCamera.html">Phaser.Component.FixedToCamera</a></li><li><a href="Phaser.Component.Health.html">Phaser.Component.Health</a></li><li><a href="Phaser.Component.InCamera.html">Phaser.Component.InCamera</a></li><li><a href="Phaser.Component.InputEnabled.html">Phaser.Component.InputEnabled</a></li><li><a href="Phaser.Component.InWorld.html">Phaser.Component.InWorld</a></li><li><a href="Phaser.Component.LifeSpan.html">Phaser.Component.LifeSpan</a></li><li><a href="Phaser.Component.LoadTexture.html">Phaser.Component.LoadTexture</a></li><li><a href="Phaser.Component.Overlap.html">Phaser.Component.Overlap</a></li><li><a href="Phaser.Component.PhysicsBody.html">Phaser.Component.PhysicsBody</a></li><li><a href="Phaser.Component.Reset.html">Phaser.Component.Reset</a></li><li><a href="Phaser.Component.ScaleMinMax.html">Phaser.Component.ScaleMinMax</a></li><li><a href="Phaser.Component.Smoothed.html">Phaser.Component.Smoothed</a></li><li><a href="Phaser.Create.html">Phaser.Create</a></li><li><a href="Phaser.Creature.html">Phaser.Creature</a></li><li><a href="Phaser.Device.html">Phaser.Device</a></li><li><a href="Phaser.DeviceButton.html">Phaser.DeviceButton</a></li><li><a href="Phaser.DOM.html">Phaser.DOM</a></li><li><a href="Phaser.Easing.html">Phaser.Easing</a></li><li><a href="Phaser.Easing.Back.html">Phaser.Easing.Back</a></li><li><a href="Phaser.Easing.Bounce.html">Phaser.Easing.Bounce</a></li><li><a href="Phaser.Easing.Circular.html">Phaser.Easing.Circular</a></li><li><a href="Phaser.Easing.Cubic.html">Phaser.Easing.Cubic</a></li><li><a href="Phaser.Easing.Elastic.html">Phaser.Easing.Elastic</a></li><li><a href="Phaser.Easing.Exponential.html">Phaser.Easing.Exponential</a></li><li><a href="Phaser.Easing.Linear.html">Phaser.Easing.Linear</a></li><li><a href="Phaser.Easing.Quadratic.html">Phaser.Easing.Quadratic</a></li><li><a href="Phaser.Easing.Quartic.html">Phaser.Easing.Quartic</a></li><li><a href="Phaser.Easing.Quintic.html">Phaser.Easing.Quintic</a></li><li><a href="Phaser.Easing.Sinusoidal.html">Phaser.Easing.Sinusoidal</a></li><li><a href="Phaser.Ellipse.html">Phaser.Ellipse</a></li><li><a href="Phaser.Events.html">Phaser.Events</a></li><li><a href="Phaser.Filter.html">Phaser.Filter</a></li><li><a href="Phaser.FlexGrid.html">Phaser.FlexGrid</a></li><li><a href="Phaser.FlexLayer.html">Phaser.FlexLayer</a></li><li><a href="Phaser.Frame.html">Phaser.Frame</a></li><li><a href="Phaser.FrameData.html">Phaser.FrameData</a></li><li><a href="Phaser.Game.html">Phaser.Game</a></li><li><a href="Phaser.GameObjectCreator.html">Phaser.GameObjectCreator</a></li><li><a href="Phaser.GameObjectFactory.html">Phaser.GameObjectFactory</a></li><li><a href="Phaser.Gamepad.html">Phaser.Gamepad</a></li><li><a href="Phaser.Graphics.html">Phaser.Graphics</a></li><li><a href="Phaser.Group.html">Phaser.Group</a></li><li><a href="Phaser.Hermite.html">Phaser.Hermite</a></li><li><a href="Phaser.Image.html">Phaser.Image</a></li><li><a href="Phaser.ImageCollection.html">Phaser.ImageCollection</a></li><li><a href="Phaser.Input.html">Phaser.Input</a></li><li><a href="Phaser.InputHandler.html">Phaser.InputHandler</a></li><li><a href="Phaser.Key.html">Phaser.Key</a></li><li><a href="Phaser.Keyboard.html">Phaser.Keyboard</a></li><li><a href="Phaser.KeyCode.html">Phaser.KeyCode</a></li><li><a href="Phaser.Line.html">Phaser.Line</a></li><li><a href="Phaser.LinkedList.html">Phaser.LinkedList</a></li><li><a href="Phaser.Loader.html">Phaser.Loader</a></li><li><a href="Phaser.LoaderParser.html">Phaser.LoaderParser</a></li><li><a href="Phaser.Math.html">Phaser.Math</a></li><li><a href="Phaser.Matrix.html">Phaser.Matrix</a></li><li><a href="Phaser.Mouse.html">Phaser.Mouse</a></li><li><a href="Phaser.MouseWheel.html">Phaser.MouseWheel</a></li><li><a href="Phaser.MSPointer.html">Phaser.MSPointer</a></li><li><a href="Phaser.Net.html">Phaser.Net</a></li><li><a href="Phaser.Particle.html">Phaser.Particle</a></li><li><a href="Phaser.Particles.html">Phaser.Particles</a></li><li><a href="Phaser.Particles.Arcade.html">Phaser.Particles.Arcade</a></li><li><a href="Phaser.Particles.Arcade.Emitter.html">Phaser.Particles.Arcade.Emitter</a></li><li><a href="Phaser.Path.html">Phaser.Path</a></li><li><a href="Phaser.PathFollower.html">Phaser.PathFollower</a></li><li><a href="Phaser.PathPoint.html">Phaser.PathPoint</a></li><li><a href="Phaser.Physics.html">Phaser.Physics</a></li><li><a href="Phaser.Physics.Arcade.html">Phaser.Physics.Arcade</a></li><li><a href="Phaser.Physics.Arcade.Body.html">Phaser.Physics.Arcade.Body</a></li><li><a href="Phaser.Physics.Arcade.TilemapCollision.html">Phaser.Physics.Arcade.TilemapCollision</a></li><li><a href="Phaser.Physics.Ninja.html">Phaser.Physics.Ninja</a></li><li><a href="Phaser.Physics.Ninja.AABB.html">Phaser.Physics.Ninja.AABB</a></li><li><a href="Phaser.Physics.Ninja.Body.html">Phaser.Physics.Ninja.Body</a></li><li><a href="Phaser.Physics.Ninja.Circle.html">Phaser.Physics.Ninja.Circle</a></li><li><a href="Phaser.Physics.Ninja.Tile.html">Phaser.Physics.Ninja.Tile</a></li><li><a href="Phaser.Physics.P2.html">Phaser.Physics.P2</a></li><li><a href="Phaser.Physics.P2.Body.html">Phaser.Physics.P2.Body</a></li><li><a href="Phaser.Physics.P2.BodyDebug.html">Phaser.Physics.P2.BodyDebug</a></li><li><a href="Phaser.Physics.P2.CollisionGroup.html">Phaser.Physics.P2.CollisionGroup</a></li><li><a href="Phaser.Physics.P2.ContactMaterial.html">Phaser.Physics.P2.ContactMaterial</a></li><li><a href="Phaser.Physics.P2.DistanceConstraint.html">Phaser.Physics.P2.DistanceConstraint</a></li><li><a href="Phaser.Physics.P2.FixtureList.html">Phaser.Physics.P2.FixtureList</a></li><li><a href="Phaser.Physics.P2.GearConstraint.html">Phaser.Physics.P2.GearConstraint</a></li><li><a href="Phaser.Physics.P2.InversePointProxy.html">Phaser.Physics.P2.InversePointProxy</a></li><li><a href="Phaser.Physics.P2.LockConstraint.html">Phaser.Physics.P2.LockConstraint</a></li><li><a href="Phaser.Physics.P2.Material.html">Phaser.Physics.P2.Material</a></li><li><a href="Phaser.Physics.P2.PointProxy.html">Phaser.Physics.P2.PointProxy</a></li><li><a href="Phaser.Physics.P2.PrismaticConstraint.html">Phaser.Physics.P2.PrismaticConstraint</a></li><li><a href="Phaser.Physics.P2.RevoluteConstraint.html">Phaser.Physics.P2.RevoluteConstraint</a></li><li><a href="Phaser.Physics.P2.RotationalSpring.html">Phaser.Physics.P2.RotationalSpring</a></li><li><a href="Phaser.Physics.P2.Spring.html">Phaser.Physics.P2.Spring</a></li><li><a href="Phaser.Plugin.html">Phaser.Plugin</a></li><li><a href="Phaser.Plugin.PathManager.html">Phaser.Plugin.PathManager</a></li><li><a href="Phaser.PluginManager.html">Phaser.PluginManager</a></li><li><a href="Phaser.Point.html">Phaser.Point</a></li><li><a href="Phaser.Pointer.html">Phaser.Pointer</a></li><li><a href="Phaser.PointerLock.html">Phaser.PointerLock</a></li><li><a href="Phaser.PointerMode.html">Phaser.PointerMode</a></li><li><a href="Phaser.Polygon.html">Phaser.Polygon</a></li><li><a href="Phaser.QuadTree.html">Phaser.QuadTree</a></li><li><a href="Phaser.RandomDataGenerator.html">Phaser.RandomDataGenerator</a></li><li><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></li><li><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></li><li><a href="Phaser.RequestAnimationFrame.html">Phaser.RequestAnimationFrame</a></li><li><a href="Phaser.RetroFont.html">Phaser.RetroFont</a></li><li><a href="Phaser.Rope.html">Phaser.Rope</a></li><li><a href="Phaser.RoundedRectangle.html">Phaser.RoundedRectangle</a></li><li><a href="Phaser.ScaleManager.html">Phaser.ScaleManager</a></li><li><a href="Phaser.Signal.html">Phaser.Signal</a></li><li><a href="Phaser.SignalBinding_.html">Phaser.SignalBinding</a></li><li><a href="Phaser.SinglePad.html">Phaser.SinglePad</a></li><li><a href="Phaser.Sound.html">Phaser.Sound</a></li><li><a href="Phaser.SoundManager.html">Phaser.SoundManager</a></li><li><a href="Phaser.Sprite.html">Phaser.Sprite</a></li><li><a href="Phaser.SpriteBatch.html">Phaser.SpriteBatch</a></li><li><a href="Phaser.Stage.html">Phaser.Stage</a></li><li><a href="Phaser.State.html">Phaser.State</a></li><li><a href="Phaser.StateManager.html">Phaser.StateManager</a></li><li><a href="Phaser.Text.html">Phaser.Text</a></li><li><a href="Phaser.Tile.html">Phaser.Tile</a></li><li><a href="Phaser.Tilemap.html">Phaser.Tilemap</a></li><li><a href="Phaser.TilemapLayer.html">Phaser.TilemapLayer</a></li><li><a href="Phaser.TilemapParser.html">Phaser.TilemapParser</a></li><li><a href="Phaser.Tileset.html">Phaser.Tileset</a></li><li><a href="Phaser.TileSprite.html">Phaser.TileSprite</a></li><li><a href="Phaser.Time.html">Phaser.Time</a></li><li><a href="Phaser.Timer.html">Phaser.Timer</a></li><li><a href="Phaser.TimerEvent.html">Phaser.TimerEvent</a></li><li><a href="Phaser.Touch.html">Phaser.Touch</a></li><li><a href="Phaser.Tween.html">Phaser.Tween</a></li><li><a href="Phaser.TweenData.html">Phaser.TweenData</a></li><li><a href="Phaser.TweenManager.html">Phaser.TweenManager</a></li><li><a href="Phaser.Utils.html">Phaser.Utils</a></li><li><a href="Phaser.Utils.Debug.html">Phaser.Utils.Debug</a></li><li><a href="Phaser.Video.html">Phaser.Video</a></li><li><a href="Phaser.Weapon.html">Phaser.Weapon</a></li><li><a href="Phaser.World.html">Phaser.World</a></li><li><a href="PIXI.BaseTexture.html">PIXI.BaseTexture</a></li><li><a href="PIXI.CanvasBuffer.html">PIXI.CanvasBuffer</a></li><li><a href="PIXI.CanvasGraphics.html">PIXI.CanvasGraphics</a></li><li><a href="PIXI.CanvasMaskManager.html">PIXI.CanvasMaskManager</a></li><li><a href="PIXI.CanvasRenderer.html">PIXI.CanvasRenderer</a></li><li><a href="PIXI.CanvasTinter.html">PIXI.CanvasTinter</a></li><li><a href="PIXI.ComplexPrimitiveShader.html">PIXI.ComplexPrimitiveShader</a></li><li><a href="PIXI.DisplayObject.html">PIXI.DisplayObject</a></li><li><a href="PIXI.DisplayObjectContainer.html">PIXI.DisplayObjectContainer</a></li><li><a href="PIXI.FilterTexture.html">PIXI.FilterTexture</a></li><li><a href="PIXI.Phaser.GraphicsData.html">PIXI.Phaser.GraphicsData</a></li><li><a href="PIXI.PixiFastShader.html">PIXI.PixiFastShader</a></li><li><a href="PIXI.PixiShader.html">PIXI.PixiShader</a></li><li><a href="PIXI.PrimitiveShader.html">PIXI.PrimitiveShader</a></li><li><a href="PIXI.Sprite.html">PIXI.Sprite</a></li><li><a href="PIXI.StripShader.html">PIXI.StripShader</a></li><li><a href="PIXI.Texture.html">PIXI.Texture</a></li><li><a href="PIXI.WebGLBlendModeManager.html">PIXI.WebGLBlendModeManager</a></li><li><a href="PIXI.WebGLFastSpriteBatch.html">PIXI.WebGLFastSpriteBatch</a></li><li><a href="PIXI.WebGLFilterManager.html">PIXI.WebGLFilterManager</a></li><li><a href="PIXI.WebGLRenderer.html">PIXI.WebGLRenderer</a></li>
  				</ul>
  			</li>
  			
  			<li class="dropdown">
  				<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
  				<ul class="dropdown-menu ">
  					<li><a href="global.html">Global</a></li>
  				</ul>
  			</li>
  			
        <li>
  <a href="https://github.com/photonstorm/phaser-ce/blob/master/README.md">
    <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
    README
  </a>
</li>

<li>
  <a href="https://github.com/photonstorm/phaser-ce/blob/master/CHANGELOG.md">
    <span class="glyphicon glyphicon-list" aria-hidden="true"></span>
    CHANGELOG
  </a>
</li>

<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
    <span class="glyphicon glyphicon-globe" aria-hidden="true"></span>
    Community
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu">
    <li>
      <a href="http://phaser.io">Phaser</a>
    </li>
    <li>
      <a href="https://github.com/photonstorm/phaser-ce">Phaser CE on GitHub</a>
    </li>
    <li>
      <a href="https://codepen.io/collection/AMbZgY/">Phaser CE Examples</a>
    </li>
    <li>
      <a href="http://www.html5gamedevs.com/forum/14-phaser/">Forum</a>
    </li>
    <li>
      <a href="https://twitter.com/photonstorm">Twitter</a>
    </li>
    <li>
      <a href="http://phaser.io/community/slack">Slack</a>
    </li>
    <li>
      <a href="http://phaser.io/community/donate">Donate</a>
    </li>
  </ul>
</li>

  		</ul>
          
  	</div>
  </div>
</div>


<div class="container-fluid" id="toc-content">
	<div class="row">
		
	  <div class="col-md-9 col-md-offset-3">
		
			<div id="main">

	<h1 class="page-title">Class: Loader</h1>
<section>

<header>
    
        <h2>
            <span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
        
        Loader
        </h2>
        
    
</header>


<article>
    <div class="container-overview">
    
        
<dt>
    <h4 class="name" id="Loader" data-name="Loader">
      <span class="type-signature"></span>new Loader(game)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.</p>
<p>The loader uses a combination of tag loading (eg. Image elements) and XHR and provides progress and completion callbacks.</p>
<p>Parallel loading (see <a href="Phaser.Loader.html#enableParallel">enableParallel</a>) is supported and enabled by default.
Load-before behavior of parallel resources is controlled by synchronization points as discussed in <a href="Phaser.Loader.html#withSyncPoint">withSyncPoint</a>.</p>
<p>Texture Atlases can be created with tools such as <a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a> and
<a href="http://renderhjs.net/shoebox/">Shoebox</a></p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>game</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>



            
            </td>

            

            

            <td class="description param-description last"><p>A reference to the currently running game.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L22" title="Loader on line 22 of src/loader/Loader.js">src/loader/Loader.js line 22</a>
    

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

    
    </div>

    

    

    

    

    

    
        <h3 class="subsection-title">Members</h3>

        <dl>
            
<dt>
    <h4 id=".PHYSICS_LIME_CORONA_JSON" data-name="PHYSICS_LIME_CORONA_JSON">
      <span class="type-signature">&lt;static, constant> </span>PHYSICS_LIME_CORONA_JSON<span class="type-signature"> : number</span>
      
    </h4>
    
</dt>
<dd>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L323" title="PHYSICS_LIME_CORONA_JSON on line 323 of src/loader/Loader.js">src/loader/Loader.js line 323</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id=".PHYSICS_PHASER_JSON" data-name="PHYSICS_PHASER_JSON">
      <span class="type-signature">&lt;static, constant> </span>PHYSICS_PHASER_JSON<span class="type-signature"> : number</span>
      
    </h4>
    
</dt>
<dd>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L329" title="PHYSICS_PHASER_JSON on line 329 of src/loader/Loader.js">src/loader/Loader.js line 329</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id=".TEXTURE_ATLAS_JSON_ARRAY" data-name="TEXTURE_ATLAS_JSON_ARRAY">
      <span class="type-signature">&lt;static, constant> </span>TEXTURE_ATLAS_JSON_ARRAY<span class="type-signature"> : number</span>
      
    </h4>
    
</dt>
<dd>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L305" title="TEXTURE_ATLAS_JSON_ARRAY on line 305 of src/loader/Loader.js">src/loader/Loader.js line 305</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id=".TEXTURE_ATLAS_JSON_HASH" data-name="TEXTURE_ATLAS_JSON_HASH">
      <span class="type-signature">&lt;static, constant> </span>TEXTURE_ATLAS_JSON_HASH<span class="type-signature"> : number</span>
      
    </h4>
    
</dt>
<dd>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L311" title="TEXTURE_ATLAS_JSON_HASH on line 311 of src/loader/Loader.js">src/loader/Loader.js line 311</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id=".TEXTURE_ATLAS_JSON_PYXEL" data-name="TEXTURE_ATLAS_JSON_PYXEL">
      <span class="type-signature">&lt;static, constant> </span>TEXTURE_ATLAS_JSON_PYXEL<span class="type-signature"> : number</span>
      
    </h4>
    
</dt>
<dd>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L335" title="TEXTURE_ATLAS_JSON_PYXEL on line 335 of src/loader/Loader.js">src/loader/Loader.js line 335</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id=".TEXTURE_ATLAS_XML_STARLING" data-name="TEXTURE_ATLAS_XML_STARLING">
      <span class="type-signature">&lt;static, constant> </span>TEXTURE_ATLAS_XML_STARLING<span class="type-signature"> : number</span>
      
    </h4>
    
</dt>
<dd>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L317" title="TEXTURE_ATLAS_XML_STARLING on line 317 of src/loader/Loader.js">src/loader/Loader.js line 317</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="_withSyncPointDepth" data-name="_withSyncPointDepth">
      <span class="type-signature"></span>_withSyncPointDepth<span class="type-signature"></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>A counter: if more than zero, files will be automatically added as a synchronization point.</p>
    </div>
    

    

    
<dl class="details">
    

    <h5 class="subsection-title">Properties:</h5>

    <dl>

<table class="props table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>_withSyncPointDepth;</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            

            

            <td class="description prop-description last"></td>
        </tr>

    
    </tbody>
</table>
</dl>

    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L228" title="_withSyncPointDepth on line 228 of src/loader/Loader.js">src/loader/Loader.js line 228</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="baseURL" data-name="baseURL">
      <span class="type-signature"></span>baseURL<span class="type-signature"> : string</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>If you want to append a URL before the path of any asset you can set this here.
Useful if allowing the asset base url to be configured outside of the game code.
The string <em>must</em> end with a &quot;/&quot;.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">string</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L84" title="baseURL on line 84 of src/loader/Loader.js">src/loader/Loader.js line 84</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="cache" data-name="cache">
      <span class="type-signature">&lt;protected> </span>cache<span class="type-signature"> : <a href="Phaser.Cache.html">Phaser.Cache</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>Local reference to the Phaser.Cache.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Cache.html">Phaser.Cache</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L37" title="cache on line 37 of src/loader/Loader.js">src/loader/Loader.js line 37</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="crossOrigin" data-name="crossOrigin">
      <span class="type-signature"></span>crossOrigin<span class="type-signature"> : boolean | string</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>
|

<span class="param-type">string</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L75" title="crossOrigin on line 75 of src/loader/Loader.js">src/loader/Loader.js line 75</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="enableParallel" data-name="enableParallel">
      <span class="type-signature"></span>enableParallel<span class="type-signature"> : boolean</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>If true (the default) then parallel downloading will be enabled.</p>
<p>To disable all parallel downloads this must be set to false prior to any resource being loaded.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L211" title="enableParallel on line 211 of src/loader/Loader.js">src/loader/Loader.js line 211</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="game" data-name="game">
      <span class="type-signature">&lt;protected> </span>game<span class="type-signature"> : <a href="Phaser.Game.html">Phaser.Game</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>Local reference to game.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L30" title="game on line 30 of src/loader/Loader.js">src/loader/Loader.js line 30</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="hasLoaded" data-name="hasLoaded">
      <span class="type-signature"></span>hasLoaded<span class="type-signature"> : boolean</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>True if all assets in the queue have finished loading.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L58" title="hasLoaded on line 58 of src/loader/Loader.js">src/loader/Loader.js line 58</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="headers" data-name="headers">
      <span class="type-signature"></span>headers<span class="type-signature"> : object</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>Used to map the application mime-types to to the Accept header in XHR requests.
If you don't require these mappings, or they cause problems on your server, then
remove them from the headers object and the XHR request will not try to use them.</p>
<p>This object can also be used to set the <code>X-Requested-With</code> header to
<code>XMLHttpRequest</code> (or any other value you need). To enable this do:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.headers.requestedWith = 'XMLHttpRequest'</code></pre><p>before adding anything to the Loader. The XHR loader will then call:</p>
<pre class="prettyprint source lang-javascript"><code>setRequestHeader('X-Requested-With', this.headers['requestedWith'])</code></pre>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">object</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>{"requestedWith":false,"json":"application/json","xml":"application/xml"}</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L129" title="headers on line 129 of src/loader/Loader.js">src/loader/Loader.js line 129</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="isLoading" data-name="isLoading">
      <span class="type-signature"></span>isLoading<span class="type-signature"> : boolean</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>True if the Loader is in the process of loading the queue.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L51" title="isLoading on line 51 of src/loader/Loader.js">src/loader/Loader.js line 51</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="maxParallelDownloads" data-name="maxParallelDownloads">
      <span class="type-signature"></span>maxParallelDownloads<span class="type-signature"> : integer</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The number of concurrent / parallel resources to try and fetch at once.</p>
<p>Many current browsers limit 6 requests per domain; this is slightly conservative.</p>
<p>This should generally be left at the default, but can be set to a higher limit for specific use-cases. Just be careful when setting large values as different browsers could behave differently.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">integer</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L222" title="maxParallelDownloads on line 222 of src/loader/Loader.js">src/loader/Loader.js line 222</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="onBeforeLoadComplete" data-name="onBeforeLoadComplete">
      <span class="type-signature"></span>onBeforeLoadComplete<span class="type-signature"> : <a href="Phaser.Signal.html">Phaser.Signal</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>This event is dispatched when the final file in the load queue has either loaded or failed,
before <a href="Phaser.Loader.html#onLoadComplete">onLoadComplete</a> and before the loader is <a href="Phaser.Loader.html#reset">reset</a>.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L149" title="onBeforeLoadComplete on line 149 of src/loader/Loader.js">src/loader/Loader.js line 149</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="onFileComplete" data-name="onFileComplete">
      <span class="type-signature"></span>onFileComplete<span class="type-signature"> : <a href="Phaser.Signal.html">Phaser.Signal</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>This event is dispatched when a file has either loaded or failed to load.</p>
<p>Any function bound to this will receive the following parameters:</p>
<p>progress, file key, success?, total loaded files, total files</p>
<p>Where progress is a number between 1 and 100 (inclusive) representing the percentage of the load.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L191" title="onFileComplete on line 191 of src/loader/Loader.js">src/loader/Loader.js line 191</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="onFileError" data-name="onFileError">
      <span class="type-signature"></span>onFileError<span class="type-signature"> : <a href="Phaser.Signal.html">Phaser.Signal</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>This event is dispatched when a file (or pack) errors as a result of the load request.</p>
<p>For files it will be triggered before <code>onFileComplete</code>. For packs it will be triggered before <code>onPackComplete</code>.</p>
<p>Params: <code>(file key, file)</code></p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L202" title="onFileError on line 202 of src/loader/Loader.js">src/loader/Loader.js line 202</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="onFileStart" data-name="onFileStart">
      <span class="type-signature"></span>onFileStart<span class="type-signature"> : <a href="Phaser.Signal.html">Phaser.Signal</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>This event is dispatched immediately before a file starts loading.
It's possible the file may fail (eg. download error, invalid format) after this event is sent.</p>
<p>Params: <code>(progress, file key, file url)</code></p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L178" title="onFileStart on line 178 of src/loader/Loader.js">src/loader/Loader.js line 178</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="onLoadComplete" data-name="onLoadComplete">
      <span class="type-signature"></span>onLoadComplete<span class="type-signature"> : <a href="Phaser.Signal.html">Phaser.Signal</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>This event is dispatched when the final file in the load queue has either loaded or failed,
after the loader is <a href="Phaser.Loader.html#reset">reset</a>.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L157" title="onLoadComplete on line 157 of src/loader/Loader.js">src/loader/Loader.js line 157</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="onLoadStart" data-name="onLoadStart">
      <span class="type-signature"></span>onLoadStart<span class="type-signature"> : <a href="Phaser.Signal.html">Phaser.Signal</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>This event is dispatched when the loading process starts: before the first file has been requested,
but after all the initial packs have been loaded.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L141" title="onLoadStart on line 141 of src/loader/Loader.js">src/loader/Loader.js line 141</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="onPackComplete" data-name="onPackComplete">
      <span class="type-signature"></span>onPackComplete<span class="type-signature"> : <a href="Phaser.Signal.html">Phaser.Signal</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>This event is dispatched when an asset pack has either loaded or failed to load.</p>
<p>This is called when the asset pack manifest file has loaded and successfully added its contents to the loader queue.</p>
<p>Params: <code>(pack key, success?, total packs loaded, total packs)</code></p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L168" title="onPackComplete on line 168 of src/loader/Loader.js">src/loader/Loader.js line 168</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="path" data-name="path">
      <span class="type-signature"></span>path<span class="type-signature"> : string</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The value of <code>path</code>, if set, is placed before any <em>relative</em> file path given. For example:</p>
<pre class="prettyprint source lang-javascript"><code>load.path = &quot;images/sprites/&quot;;
load.image(&quot;ball&quot;, &quot;ball.png&quot;);
load.image(&quot;tree&quot;, &quot;level1/oaktree.png&quot;);
load.image(&quot;boom&quot;, &quot;http://server.com/explode.png&quot;);</code></pre><p>Would load the <code>ball</code> file from <code>images/sprites/ball.png</code> and the tree from
<code>images/sprites/level1/oaktree.png</code> but the file <code>boom</code> would load from the URL
given as it's an absolute URL.</p>
<p>Please note that the path is added before the filename but <em>after</em> the baseURL (if set.)</p>
<p>The string <em>must</em> end with a &quot;/&quot;.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">string</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L106" title="path on line 106 of src/loader/Loader.js">src/loader/Loader.js line 106</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="preloadSprite" data-name="preloadSprite">
      <span class="type-signature">&lt;protected> </span>preloadSprite<span class="type-signature"> : object</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>You can optionally link a progress sprite with <a href="Phaser.Loader.html#setPreloadSprite">setPreloadSprite</a>.</p>
<p>This property is an object containing: sprite, rect, direction, width and height</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">object</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L68" title="preloadSprite on line 68 of src/loader/Loader.js">src/loader/Loader.js line 68</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="progress" data-name="progress">
      <span class="type-signature"></span>progress<span class="type-signature"></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The rounded load progress percentage value (from 0 to 100). See <a href="Phaser.Loader.html#progressFloat">Phaser.Loader#progressFloat</a>.</p>
    </div>
    

    

    
<dl class="details">
    

    <h5 class="subsection-title">Properties:</h5>

    <dl>

<table class="props table table-striped">
    <thead>
    <tr>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            

            

            <td class="description prop-description last"></td>
        </tr>

    
    </tbody>
</table>
</dl>

    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L3251" title="progress on line 3251 of src/loader/Loader.js">src/loader/Loader.js line 3251</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="progressFloat" data-name="progressFloat">
      <span class="type-signature"></span>progressFloat<span class="type-signature"></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The non-rounded load progress value (from 0.0 to 100.0).</p>
<p>A general indicator of the progress.
It is possible for the progress to decrease, after <code>onLoadStart</code>, if more files are dynamically added.</p>
    </div>
    

    

    
<dl class="details">
    

    <h5 class="subsection-title">Properties:</h5>

    <dl>

<table class="props table table-striped">
    <thead>
    <tr>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            

            

            <td class="description prop-description last"></td>
        </tr>

    
    </tbody>
</table>
</dl>

    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L3232" title="progressFloat on line 3232 of src/loader/Loader.js">src/loader/Loader.js line 3232</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="resetLocked" data-name="resetLocked">
      <span class="type-signature"></span>resetLocked<span class="type-signature"> : boolean</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>If true all calls to Loader.reset will be ignored. Useful if you need to create a load queue before swapping to a preloader state.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L44" title="resetLocked on line 44 of src/loader/Loader.js">src/loader/Loader.js line 44</a>
    

	

	

	
</dl>


    
</dd>

        </dl>
    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
<dt>
    <h4 class="name" id="addSyncPoint" data-name="addSyncPoint">
      <span class="type-signature"></span>addSyncPoint(type, key)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Add a synchronization point to a specific file/asset in the load queue.</p>
<p>This has no effect on already loaded assets.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The type of resource to turn into a sync point (image, audio, xml, etc).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>Key of the file you want to turn into a sync point.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1881" title="addSyncPoint on line 1881 of src/loader/Loader.js">src/loader/Loader.js line 1881</a>
    

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="Phaser.Loader.html#withSyncPoint">withSyncPoint</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="addToFileList" data-name="addToFileList">
      <span class="type-signature">&lt;protected> </span>addToFileList(type, key [, url] [, properties] [, overwrite] [, extension])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Internal function that adds a new entry to the file list. Do not call directly.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The type of resource to add to the list (image, audio, xml, etc).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The unique Cache ID key of this resource.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The URL the asset will be loaded from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>properties</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    (none)
                
                </td>
            

            <td class="description param-description last"><p>Any additional properties needed to load the file. These are added directly to the added file object and overwrite any defaults.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>overwrite</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>If true then this will overwrite a file asset of the same type/key. Otherwise it will only add a new asset. If overwrite is true, and the asset is already being loaded (or has been loaded), then it is appended instead.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>extension</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>If no URL is given the Loader will sometimes auto-generate the URL based on the key, using this as the extension.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L522" title="addToFileList on line 522 of src/loader/Loader.js">src/loader/Loader.js line 522</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This instance of the Phaser Loader.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="atlas" data-name="atlas">
      <span class="type-signature"></span>atlas(key [, textureURL] [, atlasURL] [, atlasData] [, format])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a Texture Atlas file to the current load queue.</p>
<p>To create the Texture Atlas you can use tools such as:</p>
<p><a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a>
<a href="http://renderhjs.net/shoebox/">Shoebox</a></p>
<p>If using Texture Packer we recommend you enable &quot;Trim sprite names&quot;.
If your atlas software has an option to &quot;rotate&quot; the resulting frames, you must disable it.</p>
<p>You can choose to either load the data externally, by providing a URL to a json file.
Or you can pass in a JSON object or String via the <code>atlasData</code> parameter.
If you pass a String the data is automatically run through <code>JSON.parse</code> and then immediately added to the Phaser.Cache.</p>
<p>If URLs are provided the files are <strong>not</strong> loaded immediately after calling this method, but are added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getImage(key)</code>. JSON files are automatically parsed upon load.
If you need to control when the JSON is parsed then use <code>Loader.text</code> instead and parse the JSON file as needed.</p>
<p>The URLs can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the textureURL isn't specified then the Loader will take the key and create a filename from that.
For example if the key is &quot;player&quot; and textureURL is null then the Loader will set the URL to be &quot;player.png&quot;.
The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will
set the atlasURL to be the key. For example if the key is &quot;player&quot; the atlasURL will be set to &quot;player.json&quot;.</p>
<p>If you do not desire this action then provide URLs and / or a data object.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>Unique asset key of the texture atlas file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>URL of the texture atlas image file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>URL of the texture atlas data file. If undefined or <code>null</code> and no atlasData is given, the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasData</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>A JSON or XML data object. You don't need this if the data is being loaded from a URL.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>format</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The format of the data. Can be Phaser.Loader.TEXTURE_ATLAS_JSON_ARRAY (the default), Phaser.Loader.TEXTURE_ATLAS_JSON_HASH or Phaser.Loader.TEXTURE_ATLAS_XML_STARLING.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1744" title="atlas on line 1744 of src/loader/Loader.js">src/loader/Loader.js line 1744</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="atlasJSONArray" data-name="atlasJSONArray">
      <span class="type-signature"></span>atlasJSONArray(key [, textureURL] [, atlasURL] [, atlasData])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a Texture Atlas file to the current load queue.</p>
<p>Unlike <code>Loader.atlasJSONHash</code> this call expects the atlas data to be in a JSON Array format.</p>
<p>To create the Texture Atlas you can use tools such as:</p>
<p><a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a>
<a href="http://renderhjs.net/shoebox/">Shoebox</a></p>
<p>If using Texture Packer we recommend you enable &quot;Trim sprite names&quot;.
If your atlas software has an option to &quot;rotate&quot; the resulting frames, you must disable it.</p>
<p>You can choose to either load the data externally, by providing a URL to a json file.
Or you can pass in a JSON object or String via the <code>atlasData</code> parameter.
If you pass a String the data is automatically run through <code>JSON.parse</code> and then immediately added to the Phaser.Cache.</p>
<p>If URLs are provided the files are <strong>not</strong> loaded immediately after calling this method, but are added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getImage(key)</code>. JSON files are automatically parsed upon load.
If you need to control when the JSON is parsed then use <code>Loader.text</code> instead and parse the JSON file as needed.</p>
<p>The URLs can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the textureURL isn't specified then the Loader will take the key and create a filename from that.
For example if the key is &quot;player&quot; and textureURL is null then the Loader will set the URL to be &quot;player.png&quot;.
The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will
set the atlasURL to be the key. For example if the key is &quot;player&quot; the atlasURL will be set to &quot;player.json&quot;.</p>
<p>If you do not desire this action then provide URLs and / or a data object.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>Unique asset key of the texture atlas file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>URL of the texture atlas image file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>URL of the texture atlas data file. If undefined or <code>null</code> and no atlasData is given, the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasData</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>A JSON data object. You don't need this if the data is being loaded from a URL.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1595" title="atlasJSONArray on line 1595 of src/loader/Loader.js">src/loader/Loader.js line 1595</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="atlasJSONHash" data-name="atlasJSONHash">
      <span class="type-signature"></span>atlasJSONHash(key [, textureURL] [, atlasURL] [, atlasData])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a Texture Atlas file to the current load queue.</p>
<p>Unlike <code>Loader.atlas</code> this call expects the atlas data to be in a JSON Hash format.</p>
<p>To create the Texture Atlas you can use tools such as:</p>
<p><a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a>
<a href="http://renderhjs.net/shoebox/">Shoebox</a></p>
<p>If using Texture Packer we recommend you enable &quot;Trim sprite names&quot;.
If your atlas software has an option to &quot;rotate&quot; the resulting frames, you must disable it.</p>
<p>You can choose to either load the data externally, by providing a URL to a json file.
Or you can pass in a JSON object or String via the <code>atlasData</code> parameter.
If you pass a String the data is automatically run through <code>JSON.parse</code> and then immediately added to the Phaser.Cache.</p>
<p>If URLs are provided the files are <strong>not</strong> loaded immediately after calling this method, but are added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getImage(key)</code>. JSON files are automatically parsed upon load.
If you need to control when the JSON is parsed then use <code>Loader.text</code> instead and parse the JSON file as needed.</p>
<p>The URLs can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the textureURL isn't specified then the Loader will take the key and create a filename from that.
For example if the key is &quot;player&quot; and textureURL is null then the Loader will set the URL to be &quot;player.png&quot;.
The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will
set the atlasURL to be the key. For example if the key is &quot;player&quot; the atlasURL will be set to &quot;player.json&quot;.</p>
<p>If you do not desire this action then provide URLs and / or a data object.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>Unique asset key of the texture atlas file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>URL of the texture atlas image file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>URL of the texture atlas data file. If undefined or <code>null</code> and no atlasData is given, the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasData</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>A JSON data object. You don't need this if the data is being loaded from a URL.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1642" title="atlasJSONHash on line 1642 of src/loader/Loader.js">src/loader/Loader.js line 1642</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="atlasXML" data-name="atlasXML">
      <span class="type-signature"></span>atlasXML(key [, textureURL] [, atlasURL] [, atlasData])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a Texture Atlas file to the current load queue.</p>
<p>This call expects the atlas data to be in the Starling XML data format.</p>
<p>To create the Texture Atlas you can use tools such as:</p>
<p><a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a>
<a href="http://renderhjs.net/shoebox/">Shoebox</a></p>
<p>If using Texture Packer we recommend you enable &quot;Trim sprite names&quot;.
If your atlas software has an option to &quot;rotate&quot; the resulting frames, you must disable it.</p>
<p>You can choose to either load the data externally, by providing a URL to an xml file.
Or you can pass in an XML object or String via the <code>atlasData</code> parameter.
If you pass a String the data is automatically run through <code>Loader.parseXML</code> and then immediately added to the Phaser.Cache.</p>
<p>If URLs are provided the files are <strong>not</strong> loaded immediately after calling this method, but are added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getImage(key)</code>. XML files are automatically parsed upon load.
If you need to control when the XML is parsed then use <code>Loader.text</code> instead and parse the XML file as needed.</p>
<p>The URLs can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the textureURL isn't specified then the Loader will take the key and create a filename from that.
For example if the key is &quot;player&quot; and textureURL is null then the Loader will set the URL to be &quot;player.png&quot;.
The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will
set the atlasURL to be the key. For example if the key is &quot;player&quot; the atlasURL will be set to &quot;player.xml&quot;.</p>
<p>If you do not desire this action then provide URLs and / or a data object.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>Unique asset key of the texture atlas file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>URL of the texture atlas image file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>URL of the texture atlas data file. If undefined or <code>null</code> and no atlasData is given, the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.xml&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasData</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>An XML data object. You don't need this if the data is being loaded from a URL.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1689" title="atlasXML on line 1689 of src/loader/Loader.js">src/loader/Loader.js line 1689</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="audio" data-name="audio">
      <span class="type-signature"></span>audio(key, urls [, autoDecode])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds an audio file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getSound(key)</code>.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>Mobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio.
When they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system.
The solution is to use a lower encoding rate such as 44100 Hz.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the audio file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>urls</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array.&lt;string></span>
|

<span class="param-type">Array.&lt;object></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Either a single string or an array of URIs or pairs of <code>{uri: .., type: ..}</code>.
   If an array is specified then the first URI (or URI + mime pair) that is device-compatible will be selected.
   For example: <code>&quot;jump.mp3&quot;</code>, <code>['jump.mp3', 'jump.ogg', 'jump.m4a']</code>, or <code>[{uri: &quot;data:&lt;opus_resource&gt;&quot;, type: 'opus'}, 'fallback.mp3']</code>.
   BLOB and DATA URIs can be used but only support automatic detection when used in the pair form; otherwise the format must be manually checked before adding the resource.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>autoDecode</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description param-description last"><p>When using Web Audio the audio files can either be decoded at load time or run-time.
   Audio files can't be played until they are decoded and, if specified, this enables immediate decoding. Decoding is a non-blocking async process, however it consumes huge amounts of CPU time on mobiles especially.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1178" title="audio on line 1178 of src/loader/Loader.js">src/loader/Loader.js line 1178</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="audioSprite" data-name="audioSprite">
      <span class="type-signature"></span>audioSprite(key, urls [, jsonURL] [, jsonData] [, autoDecode])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds an audio sprite file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Audio Sprites are a combination of audio files and a JSON configuration.</p>
<p>The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite</p>
<p>Retrieve the file via <code>Cache.getSoundData(key)</code>.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the audio file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>urls</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>An array containing the URLs of the audio files, i.e.: [ 'audiosprite.mp3', 'audiosprite.ogg', 'audiosprite.m4a' ] or a single string containing just one URL.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>jsonURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The URL of the audiosprite configuration JSON object. If you wish to pass the data directly set this parameter to null.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>jsonData</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>A JSON object or string containing the audiosprite configuration data. This is ignored if jsonURL is not null.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>autoDecode</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description param-description last"><p>When using Web Audio the audio files can either be decoded at load time or run-time.
   Audio files can't be played until they are decoded and, if specified, this enables immediate decoding. Decoding is a non-blocking async process, however it consumes huge amounts of CPU time on mobiles especially.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1222" title="audioSprite on line 1222 of src/loader/Loader.js">src/loader/Loader.js line 1222</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="audiosprite" data-name="audiosprite">
      <span class="type-signature"></span>audiosprite(key, urls [, jsonURL] [, jsonData] [, autoDecode])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>A legacy alias for Loader.audioSprite. Please see that method for documentation.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the audio file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>urls</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>An array containing the URLs of the audio files, i.e.: [ 'audiosprite.mp3', 'audiosprite.ogg', 'audiosprite.m4a' ] or a single string containing just one URL.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>jsonURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The URL of the audiosprite configuration JSON object. If you wish to pass the data directly set this parameter to null.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>jsonData</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>A JSON object or string containing the audiosprite configuration data. This is ignored if jsonURL is not null.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>autoDecode</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description param-description last"><p>When using Web Audio the audio files can either be decoded at load time or run-time.
   Audio files can't be played until they are decoded and, if specified, this enables immediate decoding. Decoding is a non-blocking async process, however it consumes huge amounts of CPU time on mobiles especially.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1282" title="audiosprite on line 1282 of src/loader/Loader.js">src/loader/Loader.js line 1282</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="binary" data-name="binary">
      <span class="type-signature"></span>binary(key [, url] [, callback] [, callbackContext])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a binary file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getBinary(key)</code>.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.bin&quot;. It will always add <code>.bin</code> as the extension.
If you do not desire this action then provide a URL.</p>
<p>It will be loaded via xhr with a responseType of &quot;arraybuffer&quot;. You can specify an optional callback to process the file after load.
When the callback is called it will be passed 2 parameters: the key of the file and the file data.</p>
<p>WARNING: If a callback is specified the data will be set to whatever it returns. Always return the data object, even if you didn't modify it.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the binary file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>URL of the binary file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.bin</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.bin&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    (none)
                
                </td>
            

            <td class="description param-description last"><p>Optional callback that will be passed the file after loading, so you can perform additional processing on it.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callbackContext</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The context under which the callback will be applied. If not specified it will use the callback itself as the context.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1076" title="binary on line 1076 of src/loader/Loader.js">src/loader/Loader.js line 1076</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="bitmapFont" data-name="bitmapFont">
      <span class="type-signature"></span>bitmapFont(key, textureURL, atlasURL, atlasData [, xSpacing] [, ySpacing])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds Bitmap Font files to the current load queue.</p>
<p>To create the Bitmap Font files you can use:</p>
<p>BMFont (Windows, free): http://www.angelcode.com/products/bmfont/
Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner
Littera (Web-based, free): http://kvazars.com/littera/</p>
<p>You can choose to either load the data externally, by providing a URL to an xml file.
Or you can pass in an XML object or String via the <code>xmlData</code> parameter.
If you pass a String the data is automatically run through <code>Loader.parseXML</code> and then immediately added to the Phaser.Cache.</p>
<p>If URLs are provided the files are <strong>not</strong> loaded immediately after calling this method, but are added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getBitmapFont(key)</code>. XML files are automatically parsed upon load.
If you need to control when the XML is parsed then use <code>Loader.text</code> instead and parse the XML file as needed.</p>
<p>The URLs can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the textureURL isn't specified then the Loader will take the key and create a filename from that.
For example if the key is &quot;megaFont&quot; and textureURL is null then the Loader will set the URL to be &quot;megaFont.png&quot;.
The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will
set the atlasURL to be the key. For example if the key is &quot;megaFont&quot; the atlasURL will be set to &quot;megaFont.xml&quot;.</p>
<p>If you do not desire this action then provide URLs and / or a data object.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the bitmap font.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>URL of the Bitmap Font texture file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;megaFont&quot; then the URL will be &quot;megaFont.png&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>URL of the Bitmap Font atlas file (xml/json). If undefined or <code>null</code> AND <code>atlasData</code> is null, the url will be set to <code>&lt;key&gt;.xml</code>, i.e. if <code>key</code> was &quot;megaFont&quot; then the URL will be &quot;megaFont.xml&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasData</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>An optional Bitmap Font atlas in string form (stringified xml/json).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xSpacing</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>If you'd like to add additional horizontal spacing between the characters then set the pixel value here.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ySpacing</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>If you'd like to add additional vertical spacing between the lines then set the pixel value here.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1501" title="bitmapFont on line 1501 of src/loader/Loader.js">src/loader/Loader.js line 1501</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="checkKeyExists" data-name="checkKeyExists">
      <span class="type-signature"></span>checkKeyExists(type, key)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Check whether a file/asset with a specific key is queued to be loaded.</p>
<p>To access a loaded asset use Phaser.Cache, eg. <a href="Phaser.Cache.html#checkImageKey">Phaser.Cache#checkImageKey</a></p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The type asset you want to check.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>Key of the asset you want to check.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L393" title="checkKeyExists on line 393 of src/loader/Loader.js">src/loader/Loader.js line 393</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>Return true if exists, otherwise return false.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="getAsset" data-name="getAsset">
      <span class="type-signature"></span>getAsset(type, key)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Find a file/asset with a specific key.</p>
<p>Only assets in the download file queue will be found.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The type asset you want to check.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>Key of the asset you want to check.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L446" title="getAsset on line 446 of src/loader/Loader.js">src/loader/Loader.js line 446</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>Returns an object if found that has 2 properties: <code>index</code> and <code>file</code>; otherwise a non-true value is returned.
    The index may change and should only be used immediately following this call.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">any</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="getAssetIndex" data-name="getAssetIndex">
      <span class="type-signature"></span>getAssetIndex(type, key)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Get the queue-index of the file/asset with a specific key.</p>
<p>Only assets in the download file queue will be found.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The type asset you want to check.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>Key of the asset you want to check.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L410" title="getAssetIndex on line 410 of src/loader/Loader.js">src/loader/Loader.js line 410</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The index of this key in the filelist, or -1 if not found.
    The index may change and should only be used immediately following this call</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="image" data-name="image">
      <span class="type-signature"></span>image(key [, url] [, overwrite])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds an Image to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the image via <code>Cache.getImage(key)</code></p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension.
If you do not desire this action then provide a URL.</p>
<p>This method also supports passing in a texture object as the <code>url</code> argument. This allows you to load
compressed textures into Phaser. You can also use <code>Loader.texture</code> to do this.</p>
<p>Compressed Textures are a WebGL only feature, and require 3rd party tools to create.
Available tools include Texture Packer, PVRTexTool, DirectX Texture Tool and Mali Texture Compression Tool.</p>
<p>Supported texture compression formats are: PVRTC, S3TC and ETC1.
Supported file formats are: PVR, DDS, KTX and PKM.</p>
<p>The formats that support all 3 compression algorithms are PVR and KTX.
PKM only supports ETC1, and DDS only S3TC for now.</p>
<p>The texture path object looks like this:</p>
<pre class="prettyprint source lang-javascript"><code>load.image('factory', {
    etc1: 'assets/factory_etc1.pkm',
    s3tc: 'assets/factory_dxt1.pvr',
    pvrtc: 'assets/factory_pvrtc.pvr',
    truecolor: 'assets/factory.png'
});</code></pre><p>The <code>truecolor</code> property points to a standard PNG file, that will be used if none of the
compressed formats are supported by the browser / GPU.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of this image file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>URL of an image file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;. Can also be a texture data object.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>overwrite</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L703" title="image on line 703 of src/loader/Loader.js">src/loader/Loader.js line 703</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="imageFromBitmapData" data-name="imageFromBitmapData">
      <span class="type-signature"></span>imageFromBitmapData(key, bitmapData [, overwrite])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Generate an image from a BitmapData object and add it to the current load queue.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key for the generated image.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>bitmapData</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>overwrite</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L766" title="imageFromBitmapData on line 766 of src/loader/Loader.js">src/loader/Loader.js line 766</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="imageFromGrid" data-name="imageFromGrid">
      <span class="type-signature"></span>imageFromGrid()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Generate a grid image and add it to the current load queue.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L782" title="imageFromGrid on line 782 of src/loader/Loader.js">src/loader/Loader.js line 782</a>
    

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="Phaser.Create.html#grid">Phaser.Create#grid</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="imageFromTexture" data-name="imageFromTexture">
      <span class="type-signature"></span>imageFromTexture()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Generate a texture image and add it to the current load queue.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L795" title="imageFromTexture on line 795 of src/loader/Loader.js">src/loader/Loader.js line 795</a>
    

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="Phaser.Create.html#texture">Phaser.Create#texture</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="images" data-name="images">
      <span class="type-signature"></span>images(keys [, urls])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds an array of images to the current load queue.</p>
<p>It works by passing each element of the array to the Loader.image method.</p>
<p>The files are <strong>not</strong> loaded immediately after calling this method. The files are added to the queue ready to be loaded when the loader starts.</p>
<p>Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.</p>
<p>The keys must be unique Strings. They are used to add the files to the Phaser.Cache upon successful load.</p>
<p>Retrieve the images via <code>Cache.getImage(key)</code></p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension.
If you do not desire this action then provide a URL.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>keys</code></td>
            

            <td class="type">
            
                
<span class="param-type">array</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>An array of unique asset keys of the image files.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>urls</code></td>
            

            <td class="type">
            
                
<span class="param-type">array</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>Optional array of URLs. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;. If provided the URLs array length must match the keys array length.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L881" title="images on line 881 of src/loader/Loader.js">src/loader/Loader.js line 881</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="json" data-name="json">
      <span class="type-signature"></span>json(key [, url] [, overwrite])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a JSON file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getJSON(key)</code>. JSON files are automatically parsed upon load.
If you need to control when the JSON is parsed then use <code>Loader.text</code> instead and parse the text file as needed.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.json&quot;. It will always add <code>.json</code> as the extension.
If you do not desire this action then provide a URL.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the json file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>URL of the JSON file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>overwrite</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L955" title="json on line 955 of src/loader/Loader.js">src/loader/Loader.js line 955</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="pack" data-name="pack">
      <span class="type-signature"></span>pack(key [, url] [, data] [, callbackContext])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Add a JSON resource pack ('packfile') to the Loader.</p>
<p>A packfile is a JSON file that contains a list of assets to the be loaded.
Please see the example 'loader/asset pack' in the Phaser Examples repository.</p>
<p>Packs are always put before the first non-pack file that is not loaded / loading.</p>
<p>This means that all packs added before any loading has started are added to the front
of the file queue, in the order added.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>The URL of the packfile can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of this resource pack.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>URL of the Asset Pack JSON file. If you wish to pass a json object instead set this to null and pass the object as the data parameter.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The Asset Pack JSON data. Use this to pass in a json data object rather than loading it from a URL. TODO</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callbackContext</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    (loader)
                
                </td>
            

            <td class="description param-description last"><p>Some Loader operations, like Binary and Script require a context for their callbacks. Pass the context here.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L622" title="pack on line 622 of src/loader/Loader.js">src/loader/Loader.js line 622</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="physics" data-name="physics">
      <span class="type-signature"></span>physics(key [, url] [, data] [, format])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a physics data file to the current load queue.</p>
<p>The data must be in <code>Lime + Corona</code> JSON format. <a href="https://www.codeandweb.com">Physics Editor</a> by code'n'web exports in this format natively.</p>
<p>You can choose to either load the data externally, by providing a URL to a json file.
Or you can pass in a JSON object or String via the <code>data</code> parameter.
If you pass a String the data is automatically run through <code>JSON.parse</code> and then immediately added to the Phaser.Cache.</p>
<p>If a URL is provided the file is <strong>not</strong> loaded immediately after calling this method, but is added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getJSON(key)</code>. JSON files are automatically parsed upon load.
If you need to control when the JSON is parsed then use <code>Loader.text</code> instead and parse the text file as needed.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that.
For example if the key is &quot;alien&quot; and no URL or data is given then the Loader will set the URL to be &quot;alien.json&quot;.
It will always use <code>.json</code> as the extension.</p>
<p>If you do not desire this action then provide a URL or data object.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the physics json data.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>URL of the physics data file. If undefined or <code>null</code> and no data is given the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>An optional JSON data object. If given then the url is ignored and this JSON object is used for physics data instead.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>format</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    Phaser.Physics.LIME_CORONA_JSON
                
                </td>
            

            <td class="description param-description last"><p>The format of the physics data.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1439" title="physics on line 1439 of src/loader/Loader.js">src/loader/Loader.js line 1439</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="removeAll" data-name="removeAll">
      <span class="type-signature">&lt;protected> </span>removeAll()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Remove all file loading requests - this is <em>insufficient</em> to stop current loading. Use <code>reset</code> instead.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1930" title="removeAll on line 1930 of src/loader/Loader.js">src/loader/Loader.js line 1930</a>
    

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="removeFile" data-name="removeFile">
      <span class="type-signature">&lt;protected> </span>removeFile(type, key)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Remove a file/asset from the loading queue.</p>
<p>A file that is loaded or has started loading cannot be removed.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The type of resource to add to the list (image, audio, xml, etc).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>Key of the file you want to remove.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1905" title="removeFile on line 1905 of src/loader/Loader.js">src/loader/Loader.js line 1905</a>
    

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="replaceInFileList" data-name="replaceInFileList">
      <span class="type-signature">&lt;protected> </span>replaceInFileList(type, key, url, properties)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Internal function that replaces an existing entry in the file list with a new one. Do not call directly.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The type of resource to add to the list (image, audio, xml, etc).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The unique Cache ID key of this resource.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The URL the asset will be loaded from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>properties</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            

            

            <td class="description param-description last"><p>Any additional properties needed to load the file.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L605" title="replaceInFileList on line 605 of src/loader/Loader.js">src/loader/Loader.js line 605</a>
    

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="reset" data-name="reset">
      <span class="type-signature">&lt;protected> </span>reset( [hard] [, clearEvents])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Reset the loader and clear any queued assets. If <code>Loader.resetLocked</code> is true this operation will abort.</p>
<p>This will abort any loading and clear any queued assets.</p>
<p>Optionally you can clear any associated events.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>hard</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>If true then the preload sprite and other artifacts may also be cleared.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>clearEvents</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>If true then the all Loader signals will have removeAll called on them.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L471" title="reset on line 471 of src/loader/Loader.js">src/loader/Loader.js line 471</a>
    

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="resize" data-name="resize">
      <span class="type-signature">&lt;protected> </span>resize()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Called automatically by ScaleManager when the game resizes in RESIZE scalemode.</p>
<p>This can be used to adjust the preloading sprite size, eg.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L375" title="resize on line 375 of src/loader/Loader.js">src/loader/Loader.js line 375</a>
    

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="script" data-name="script">
      <span class="type-signature"></span>script(key [, url] [, callback] [, callbackContext])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a JavaScript file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.js&quot;. It will always add <code>.js</code> as the extension.
If you do not desire this action then provide a URL.</p>
<p>Upon successful load the JavaScript is automatically turned into a script tag and executed, so be careful what you load!</p>
<p>A callback, which will be invoked as the script tag has been created, can also be specified.
The callback must return relevant <code>data</code>.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the script file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>URL of the JavaScript file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.js</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.js&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    (none)
                
                </td>
            

            <td class="description param-description last"><p>Optional callback that will be called after the script tag has loaded, so you can perform additional processing.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callbackContext</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    (loader)
                
                </td>
            

            <td class="description param-description last"><p>The context under which the callback will be applied. If not specified it will use the Phaser Loader as the context.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1040" title="script on line 1040 of src/loader/Loader.js">src/loader/Loader.js line 1040</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="setPreloadSprite" data-name="setPreloadSprite">
      <span class="type-signature"></span>setPreloadSprite(sprite [, direction])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Set a Sprite to be a &quot;preload&quot; sprite by passing it to this method.</p>
<p>A &quot;preload&quot; sprite will have its width or height crop adjusted based on the percentage of the loader in real-time.
This allows you to easily make loading bars for games.</p>
<p>The sprite will automatically be made visible when calling this.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sprite</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|

<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The sprite or image that will be cropped during the load.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>direction</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>A value of zero means the sprite will be cropped horizontally, a value of 1 means its will be cropped vertically.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L339" title="setPreloadSprite on line 339 of src/loader/Loader.js">src/loader/Loader.js line 339</a>
    

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="shader" data-name="shader">
      <span class="type-signature"></span>shader(key [, url] [, overwrite])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a fragment shader file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getShader(key)</code>.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;blur&quot;
and no URL is given then the Loader will set the URL to be &quot;blur.frag&quot;. It will always add <code>.frag</code> as the extension.
If you do not desire this action then provide a URL.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the fragment file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>URL of the fragment file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.frag</code>, i.e. if <code>key</code> was &quot;blur&quot; then the URL will be &quot;blur.frag&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>overwrite</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L984" title="shader on line 984 of src/loader/Loader.js">src/loader/Loader.js line 984</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="spritesheet" data-name="spritesheet">
      <span class="type-signature"></span>spritesheet(key, url, frameWidth, frameHeight [, frameMax] [, margin] [, spacing] [, skipFrames])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a Sprite Sheet to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>To clarify the terminology that Phaser uses: A Sprite Sheet is an image containing frames, usually of an animation, that are all equal
dimensions and often in sequence. For example if the frame size is 32x32 then every frame in the sprite sheet will be that size.
Sometimes (outside of Phaser) the term &quot;sprite sheet&quot; is used to refer to a texture atlas.
A Texture Atlas works by packing together images as best it can, using whatever frame sizes it likes, often with cropping and trimming
the frames in the process. Software such as Texture Packer, Flash CC or Shoebox all generate texture atlases, not sprite sheets.
If you've got an atlas then use <code>Loader.atlas</code> instead.</p>
<p>The key must be a unique String. It is used to add the image to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getImage(key)</code>. Sprite sheets, being image based, live in the same Cache as all other Images.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension.
If you do not desire this action then provide a URL.</p>
<p>An image with four sprites, <code>margin = 1</code>, and <code>spacing = 1</code> looks like this:</p>
<pre class="prettyprint source"><code>.......
.     .
. # # .
.     .
. # # .
.     .
.......

.  margin
   spacing
#  sprite frame</code></pre><p>The first sprite frame is found at (margin + spacing) px from the top-left of the image.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the sheet file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>URL of the sprite sheet file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>frameWidth</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Width in pixels of a single frame in the sprite sheet.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>frameHeight</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Height in pixels of a single frame in the sprite sheet.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>frameMax</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    -1
                
                </td>
            

            <td class="description param-description last"><p>How many frames in this sprite sheet. If not specified it will divide the whole image into frames.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>margin</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>Width of any empty space at the image edges, in addition to any <code>spacing</code>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>spacing</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>Width of any empty space between the frames, and between the frames and the <code>margin</code>. If there is space <strong>only</strong> between the frames, and nowhere else, use <code>margin</code> equal to <code>-spacing</code>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>skipFrames</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>Skip a number of frames. Useful when there are multiple sprite sheets in one image.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1115" title="spritesheet on line 1115 of src/loader/Loader.js">src/loader/Loader.js line 1115</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="start" data-name="start">
      <span class="type-signature"></span>start()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Start loading the assets. Normally you don't need to call this yourself as the StateManager will do so.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1944" title="start on line 1944 of src/loader/Loader.js">src/loader/Loader.js line 1944</a>
    

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="text" data-name="text">
      <span class="type-signature"></span>text(key [, url] [, overwrite])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a Text file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getText(key)</code></p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.txt&quot;. It will always add <code>.txt</code> as the extension.
If you do not desire this action then provide a URL.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the text file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>URL of the text file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.txt</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.txt&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>overwrite</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L927" title="text on line 927 of src/loader/Loader.js">src/loader/Loader.js line 927</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="texture" data-name="texture">
      <span class="type-signature"></span>texture(key, object [, overwrite])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a Compressed Texture Image to the current load queue.</p>
<p>Compressed Textures are a WebGL only feature, and require 3rd party tools to create.
Available tools include Texture Packer, PVRTexTool, DirectX Texture Tool and Mali Texture Compression Tool.</p>
<p>Supported texture compression formats are: PVRTC, S3TC and ETC1.
Supported file formats are: PVR, DDS, KTX and PKM.</p>
<p>The formats that support all 3 compression algorithms are PVR and KTX.
PKM only supports ETC1, and DDS only S3TC for now.</p>
<p>The texture path object looks like this:</p>
<pre class="prettyprint source lang-javascript"><code>load.texture('factory', {
    etc1: 'assets/factory_etc1.pkm',
    s3tc: 'assets/factory_dxt1.pvr',
    pvrtc: 'assets/factory_pvrtc.pvr',
    truecolor: 'assets/factory.png'
});</code></pre><p>The <code>truecolor</code> property points to a standard PNG file, that will be used if none of the
compressed formats are supported by the browser / GPU.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the image via <code>Cache.getImage(key)</code></p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.pvr&quot;. It will always add <code>.pvr</code> as the extension.
If you do not desire this action then provide a URL.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of this image file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>object</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The texture path data object.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>overwrite</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L808" title="texture on line 808 of src/loader/Loader.js">src/loader/Loader.js line 808</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="tilemap" data-name="tilemap">
      <span class="type-signature"></span>tilemap(key [, url] [, data] [, format])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a Tile Map data file to the current load queue.</p>
<p>Phaser can load data in two different formats: CSV and Tiled JSON.</p>
<p>Tiled is a free software package, specifically for creating tilemaps, and is available from http://www.mapeditor.org</p>
<p>You can choose to either load the data externally, by providing a URL to a json file.
Or you can pass in a JSON object or String via the <code>data</code> parameter.
If you pass a String the data is automatically run through <code>JSON.parse</code> and then immediately added to the Phaser.Cache.</p>
<p>If a URL is provided the file is <strong>not</strong> loaded immediately after calling this method, but is added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getTilemapData(key)</code>. JSON files are automatically parsed upon load.
If you need to control when the JSON is parsed then use <code>Loader.text</code> instead and parse the text file as needed.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that.
For example if the key is &quot;level1&quot; and no URL or data is given then the Loader will set the URL to be &quot;level1.json&quot;.
If you set the format to be Tilemap.CSV it will set the URL to be &quot;level1.csv&quot; instead.</p>
<p>If you do not desire this action then provide a URL or data object.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the tilemap data.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>URL of the tile map file. If undefined or <code>null</code> and no data is given the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;level1&quot; then the URL will be &quot;level1.json&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>An optional JSON data object. If given then the url is ignored and this JSON object is used for map data instead.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>format</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    Phaser.Tilemap.CSV
                
                </td>
            

            <td class="description param-description last"><p>The format of the map data. Either Phaser.Tilemap.CSV or Phaser.Tilemap.TILED_JSON.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1356" title="tilemap on line 1356 of src/loader/Loader.js">src/loader/Loader.js line 1356</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="totalLoadedFiles" data-name="totalLoadedFiles">
      <span class="type-signature">&lt;protected> </span>totalLoadedFiles()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Returns the number of files that have already been loaded, even if they errored.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L3174" title="totalLoadedFiles on line 3174 of src/loader/Loader.js">src/loader/Loader.js line 3174</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The number of files that have already been loaded (even if they errored)</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="totalLoadedPacks" data-name="totalLoadedPacks">
      <span class="type-signature">&lt;protected> </span>totalLoadedPacks()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Returns the number of asset packs that have already been loaded, even if they errored.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L3202" title="totalLoadedPacks on line 3202 of src/loader/Loader.js">src/loader/Loader.js line 3202</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The number of asset packs that have already been loaded (even if they errored)</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="totalQueuedFiles" data-name="totalQueuedFiles">
      <span class="type-signature">&lt;protected> </span>totalQueuedFiles()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Returns the number of files still waiting to be processed in the load queue. This value decreases as each file in the queue is loaded.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L3188" title="totalQueuedFiles on line 3188 of src/loader/Loader.js">src/loader/Loader.js line 3188</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The number of files that still remain in the load queue.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="totalQueuedPacks" data-name="totalQueuedPacks">
      <span class="type-signature">&lt;protected> </span>totalQueuedPacks()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Returns the number of asset packs still waiting to be processed in the load queue. This value decreases as each pack in the queue is loaded.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L3216" title="totalQueuedPacks on line 3216 of src/loader/Loader.js">src/loader/Loader.js line 3216</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The number of asset packs that still remain in the load queue.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="transformUrl" data-name="transformUrl">
      <span class="type-signature">&lt;protected> </span>transformUrl(url, file)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Transforms the asset URL.</p>
<p>The default implementation prepends the baseURL if the url doesn't begin with http or //</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The url to transform.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>file</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The file object being transformed.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L2284" title="transformUrl on line 2284 of src/loader/Loader.js">src/loader/Loader.js line 2284</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The transformed url. In rare cases where the url isn't specified it will return false instead.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="video" data-name="video">
      <span class="type-signature"></span>video(key, urls [, loadEvent] [, asBlob])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds a video file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getVideo(key)</code>.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>You don't need to preload a video in order to play it in your game. See <code>Video.createVideoFromURL</code> for details.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the video file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>urls</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array.&lt;string></span>
|

<span class="param-type">Array.&lt;object></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Either a single string or an array of URIs or pairs of <code>{uri: .., type: ..}</code>.
   If an array is specified then the first URI (or URI + mime pair) that is device-compatible will be selected.
   For example: <code>&quot;boom.mp4&quot;</code>, <code>['boom.mp4', 'boom.ogg', 'boom.webm']</code>, or <code>[{uri: &quot;data:&lt;opus_resource&gt;&quot;, type: 'opus'}, 'fallback.mp4']</code>.
   BLOB and DATA URIs can be used but only support automatic detection when used in the pair form; otherwise the format must be manually checked before adding the resource.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>loadEvent</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'canplaythrough'
                
                </td>
            

            <td class="description param-description last"><p>This sets the Video source event to listen for before the load is considered complete.
   'canplaythrough' implies the video has downloaded enough, and bandwidth is high enough that it can be played to completion.
   'canplay' implies the video has downloaded enough to start playing, but not necessarily to finish.
   'loadeddata' just makes sure that the video meta data and first frame have downloaded. Phaser uses this value automatically if the
   browser is detected as being Firefox and no <code>loadEvent</code> is given, otherwise it defaults to <code>canplaythrough</code>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>asBlob</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>Video files can either be loaded via the creation of a video element which has its src property set.
   Or they can be loaded via xhr, stored as binary data in memory and then converted to a Blob. This isn't supported in IE9 or Android 2.
   If you need to have the same video playing at different times across multiple Sprites then you need to load it as a Blob.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1301" title="video on line 1301 of src/loader/Loader.js">src/loader/Loader.js line 1301</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="withSyncPoint" data-name="withSyncPoint">
      <span class="type-signature"></span>withSyncPoint(callback [, callbackContext])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Add a synchronization point to the assets / files added within the supplied callback.</p>
<p>A synchronization point denotes that an asset <em>must</em> be completely loaded before
subsequent assets can be loaded. An asset marked as a sync-point does not need to wait
for previous assets to load (unless they are sync-points). Resources, such as packs, may still
be downloaded around sync-points, as long as they do not finalize loading.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The callback is invoked and is supplied with a single argument: the loader.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callbackContext</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    (loader)
                
                </td>
            

            <td class="description param-description last"><p>Context for the callback.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1851" title="withSyncPoint on line 1851 of src/loader/Loader.js">src/loader/Loader.js line 1851</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="xml" data-name="xml">
      <span class="type-signature"></span>xml(key [, url] [, overwrite])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Adds an XML file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getXML(key)</code>.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.xml&quot;. It will always add <code>.xml</code> as the extension.
If you do not desire this action then provide a URL.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Unique asset key of the xml file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>URL of the XML file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.xml</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.xml&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>overwrite</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.11.0/src/loader/Loader.js#L1012" title="xml on line 1012 of src/loader/Loader.js">src/loader/Loader.js line 1012</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>



    </dd>
</dl>


        

    
</dd>

        </dl>
    

    

    
</article>

</section>



</div>
	    <footer class="footer">


<p class="package-signature">
  phaser-ce@2.11.0
  is on
  <a href="https://github.com/photonstorm/phaser-ce/releases/tag/v2.11.0">GitHub</a>
  and
  <a href="https://www.npmjs.com/package/phaser-ce">NPM</a>
</p>





	<p class="copyright">
	Phaser Copyright © 2012-2016 Photon Storm Ltd.
	</p>


<p class="jsdoc-message">
	Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a>
	
		on 2018-06-26
	
	using <a href="https://github.com/photonstorm/phaser-ce/tree/master/resources/docstrap-master">Tomorrow</a>.
</p>

</footer>

		</div>
    
      <div class="toc-container hidden-xs hidden-sm">
  <div class="toc-filter">
    <div class="form-inline">
    <div class="form-group">
      <label for="filter" class="control-label">Filter</label>
      <input type="text" class="form-control" id="toc-filter-input">
    </div>
  </div>
  </div>
  <div id="toc">
    <div class="list-group">
      <div id="toc-insert"></div>
    </div>
  </div>
</div>

    
	</div>
</div>

<script defer src="scripts/bundle.js?2018062611"></script>



</body>
</html>